package cn.itcast.dao;

import cn.itcast.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {

    //注册

    //登录
    Customer finduserbyAll(@Param("accountnumber") String name, @Param("password") String pwt);

    //根据信息查找用户
    Customer findUserByname(@Param("name") String login_name);

    Boolean adduser(User user);

    List<Yuancailiao> findml();

    Boolean delmat(@Param("id") Integer id);

    Yuancailiao findmlById(@Param("id") Integer id);

    Boolean modifyma(Yuancailiao yl);


    Integer findcot();

    List<Dishes> findfoot(@Param("name") String crux);

    Dishes findDishesByid(Integer id);
    Boolean insertCart(@Param("foodid") Integer id,@Param("name") String name,@Param("image") String image,@Param("price") Integer price);


    List<Cart> findshops();

    List<Dishes> finAlldishes();

    Boolean addorders(@Param("customerid") Integer cid,@Param("orderid") Integer oid,@Param("creationtime") String date,@Param("paymentstatus") Integer paymentstatus,@Param("address") String address,@Param("price") Integer price);

    List<Order> findorders();

    List<Cook> findcook(@Param("crux") String crux);

    Customer findcustomer(@Param("name") String name);

    Order findorderbycid(@Param("customerid") Integer cid);

    Boolean addappoint(@Param("orderid") Integer orderid,@Param("customerid") Integer customerid,@Param("cookid") Integer cookid,@Param("time") String date);

    List<Appointment> findap();

    Cook cooklogin(@Param("accountnumber") String name,@Param("password") String pwt);

    Cook fetchCookbyname(@Param("name") String login_name);

    Boolean deletedi(@Param("foodid") Integer id);

    List<Yuancailiao> findcailiao();

}
